using Godot;
using Godot.Collections;
using System;


public class WoodenBarrelBlockEntity : BlockEntity
{
    public FluidData water = new FluidData("water", 0, 16000);
    public override Dictionary getDict()
    {
        Dictionary dict = new Dictionary();
        dict.Add("water", water.GetDictionary());
        return dict;
    }
    public override BlockEntity JsonTo(Dictionary dict)
    {
        water.Parse((Dictionary)dict["water"]);
        return this;
    }
    public override FluidData GetFluid(int index)
    {
        if (index == 0) return water;
        else return null;
    }
    public override FluidData GetFluid(String name)
    {
        if (name == "water") return water;
        else return null;
    }
}

